import Vue from 'vue'
import Router from 'vue-router'

//elementUI为什么在路由用
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


import Login from '@/components/Login';
import Index from "@/components/Index";
import Admin from "@/components/Admin";
import AdminPet from "@/components/AdminPet";
import AdminAdoption from "@/components/AdminAdoption";
import AdminPetstorage from "@/components/AdminPetstorage"
import Register from "@/components/Rigister"
import AdminResetDel from "@/components/AdminResetDel"
import AdminResetLock from "@/components/AdminResetLock"
import  AdminPetAdd from "@/components/AdminPetAdd"
import  AdminModifyPet from "@/components/AdminModifyPet"
import AdminPermissionAdopation from "@/components/AdminPermissionAdopation"
import  AdminPermissionPetStorage from "@/components/AdminPermissionPetStorage"
import UserUpdate from "@/components/UserUpdate"
import UserPetStorageRequest from "@/components/UserPetStorageRequest"

Vue.use(Router)
Vue.use(ElementUI);

export default  new Router({
    routes:[
        //配置login视图路径
        {
            path:'/',                //网页搜索路径
            name:"Login",
            component: Login
        },
        {
            path:'/index',
            name:"Index",
            component: Index
        },
        {
            path:'/admin',
            name:"Admin",
            component: Admin
        },
        {
            path:"/adminPet",
            name:"AdminPet",
            component:AdminPet
        },
        {
            path:"/adminAdoption",
            name:"AdminAdoption",
            component:AdminAdoption
        },
        {
            path:"/adminPetstorage",
            name:"AdminPetstorage",
            component:AdminPetstorage
        },
        {
            path:"/register",
            name:"Register",
            component:Register
        },
        {
            path:"/adminResetDel",
            name:"AdminResetDel",
            component:AdminResetDel
        },
        {
            path:"/adminResetLock",
            name:"AdminResetLock",
            component:AdminResetLock
        },
        {
            path:"/adminPetAdd",
            name:"AdminPetAdd",
            component:AdminPetAdd
        },
        {
            path:"/adminModifyPet/:id",       //路由传参
            name:"AdminModifyPet",
            component:AdminModifyPet
        },
        {
            path:"/adminPermissionAdopation",
            name:"AdminPermissionAdopation",
            component:AdminPermissionAdopation
        },
        {
            path:"/adminPermissionPetStorage",
            name:"AdminPermissionPetStorage",
            component:AdminPermissionPetStorage
        },
        {
            path:"/userUpdate",
            name:"UserUpdate",
            component:UserUpdate
        },
        {
            path:"/userPetStorageRequest",
            name:"UserPetStorageRequest",
            component:UserPetStorageRequest
        }


    ]
})